﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Game.Editor.Toolbox
{
    public class SelectionController
    {

        public void Start()
        {
            SelectedBuilding.Selected += delegate(object source, SelectedBuildingEventArgs args)
            {
                SelectedTerrainType.TerrainType = null;
                SelectedInfrastructure.ObjectType = null;
                SelectedVehicleType.VehicleType = null;
                SelectedMapItemType.MapItemType = null;
            };

            SelectedInfrastructure.Selected += delegate(object source, SelectedInfrastructureEventArgs args)
            {
                SelectedTerrainType.TerrainType = null;
                SelectedBuilding.GameObjectGroup = null;
                SelectedVehicleType.VehicleType = null;
                SelectedMapItemType.MapItemType = null;
            };

            SelectedVehicleType.Selected += delegate(object source, SelectedVehicleTypeEventArgs args)
            {
                SelectedTerrainType.TerrainType = null;
                SelectedBuilding.GameObjectGroup = null;
                SelectedInfrastructure.ObjectType = null;
                SelectedMapItemType.MapItemType = null;
            };

            SelectedMapItemType.Selected += delegate(object source, MapItemTypeEventArgs args)
            {
                SelectedTerrainType.TerrainType = null;
                SelectedBuilding.GameObjectGroup = null;
                SelectedInfrastructure.ObjectType = null;
                SelectedVehicleType.VehicleType = null;
            };

            SelectedTerrainType.Selected += delegate(object source, SelectedTerrainTypeEventArgs args)
            {
                SelectedBuilding.GameObjectGroup = null;
                SelectedInfrastructure.ObjectType = null;
                SelectedVehicleType.VehicleType = null;
                SelectedMapItemType.MapItemType = null;
            };

        }
    }


}
